/*
 * (C) Copyright 2023 orchy
 * This file is licensed under the BSD-3-Clause license.
 * <https://spdx.org/licenses/BSD-3-Clause.html>
 */
#ifndef _STRING_H
#define _STRING_H

#ifndef _SIZE_T_DEFINED
  typedef long long int size_t;
  #define _SIZE_T_DEFINED
#endif

// # 7.21.1
// ## 7.21.1.1
#ifndef NULL
  #define NULL ((void*)0)
#endif

// # 7.21.2
// ## 7.21.2.1
void* memcpy(void* restrict s1, const void* restrict s2, size_t n);

// ## 7.21.2.2
void* memmove(void* s1, const void* s2, size_t n);

// ## 7.21.2.3
char* strcpy(char* restrict s1, const char* restrict s2);

// ## 7.21.2.4
char* strncpy(char* restrict s1, const char* restrict s2, size_t n);

// # 7.21.3
// ## 7.21.3.1
char* strcat(char* restrict s1, const char* restrict s2);

// ## 7.21.3.2
char* strncat(char* restrict s1, const char* restrict s2, size_t n);

// # 7.21.4
// ## 7.21.4.1
int memcmp(const void* s1, const void* s2, size_t n);

// ## 7.21.4.2
int strcmp(const char* s1, const char* s2);

// ## 7.21.4.3
int strcoll(const char* s1, const char* s2);

// ## 7.21.4.4
int strncmp(const char* s1, const char* s2, size_t n);

// ## 7.21.4.5
int strxfrm(char* restrict s1, const char* restrict s2, size_t n);

// # 7.21.5
// ## 7.21.5.1
void* memchr(const void* s, int c, size_t n);

// ## 7.21.5.2
char* strchr(const char* s, int c);

// ## 7.21.5.3
size_t strcspn(const char* s1, const char* s2);

// ## 7.21.5.4
char* strpbrk(const char* s1, const char* s2);

// ## 7.21.5.5
char* strrchr(const char* s, int c);

// ## 7.21.5.6
size_t strspn(const char* s1, const char* s2);

// ## 7.21.5.7
char* strstr(const char* s1, const char* s2);

// ## 7.21.5.8
char* strtok(char* restrict s1, const char* restrict s2);

// # 7.21.6
// ## 7.21.6.1
void* memset(void* s, int c, size_t n);

// ## 7.21.6.2
char* strerror(int errnum);

// ## 7.21.6.3
size_t strlen(const char* s);

#endif

